-
Notifications
You must be signed in to change notification settings - Fork 871
[Docs] 修改rst文件路径适配paddle url, 同步paconvert修改部分api的类别,完善差异文档生成脚本 #7571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7571.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
📚 本次 PR 文档预览链接(点击展开)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
分开提PR:先把第2类名单校正,然后再校正第2类api_difference。
目前问题很多,后续提交先逐个自查下是否改对。
| "NumelMatcher", | ||
| "Is_InferenceMatcher", | ||
| ]: | ||
| special_matchers = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里直接分两类来写吧。
if in ...
elif in ...
| continue | ||
| else: | ||
| # 属于 invok_diff_only,继续后续处理 | ||
| pass # 继续执行下面的文档生成逻辑 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的分支逻辑、代码风格 还是要优化下,尽量少用 pass 这些占位符
| @@ -1,16 +1,18 @@ | |||
| ## [ torch 参数更多 ]torch.Tensor.bernoulli | |||
| ### [torch.Tensor.bernoulli](https://pytorch.org/docs/stable/generated/torch.Tensor.bernoulli.html#torch.Tensor.bernoulli) | |||
| ## [ 仅参数名不一致 ]torch.Tensor.bernoulli | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | <font color='red'> lambd </font> | <font color='red'> threshold </font> | Hardshrink 阈值,仅参数名不一致。 | | ||
| | PyTorch | PaddlePaddle | 备注 | | ||
| | ------- | ------------ | ----------------------------- | | ||
| | lambd | threshold | 阈值,仅参数名不一致,功能一致 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类方法改普通方法,统一在前面加一个
| self | x | (这个描述你想想怎么描述) |
| @@ -1,21 +0,0 @@ | |||
| ## [ 仅参数名不一致 ]torch.Tensor.ormqr | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是仅参数名不一致,为何删了?
| @@ -0,0 +1,15 @@ | |||
| ## [ 仅 API 调用方式不一致 ]torch.Tensor.pinverse | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个没有转写示例吗
| @@ -1,4 +1,4 @@ | |||
| ## [ 仅参数名不一致 ]torch.autograd.function.FunctionCtx.mark_non_differentiable | |||
| ## [ 仅 API 调用方式不一致 ]torch.autograd.function.FunctionCtx.mark_non_differentiable | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仅API调用方式不一致 需要 转写示例
| name=None) | ||
| ``` | ||
|
|
||
| 其中 PyTorch 与 Paddle 指定 `dim` 后返回值不一致,具体如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有问题
|
|
||
| ### [paddle.median](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/median_cn.html#median) | ||
| ```python | ||
| paddle.median(x, axis=None, keepdim=False, mode='avg', name=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是paddle.compat.median,这个是否是根据api_mapping.json来生成的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是旧文档的写法,得升级完validate_docs后才能把这些问题解决
| @@ -1,4 +1,4 @@ | |||
| ## [ 返回参数类型不一致 ]torch.min | |||
| ## [ 仅 API 调用方式不一致 ]torch.min | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也都不对


No description provided.